﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package Transactions {
    import Engine.Transactions.*;
    import Display.*;
    import Classes.inventory.*;
    import Modules.franchise.*;

    public class TFinalizePendingCityName extends Transaction {

        override public function perform():void{
            signedCall("UserService.finalizePendingCityName");
        }
        override protected function onComplete(_arg1:Object):void{
            if (((_arg1.hasOwnProperty("name")) && (((!((_arg1["name"] == null))) && (!((_arg1["name"] == "null"))))))){
                Global.player.cityName = Global.player.pendingCityName;
                UI.setCityName(Global.player.pendingCityName);
                Global.player.pendingCityName = null;
                Global.player.requestInventory.removeItem(RequestItemType.SIGNATURE, Global.franchiseManager.getSignatureCount(FranchiseManager.CITY_ITEM_NAME), FranchiseManager.CITY_ITEM_NAME);
            };
        }

    }
}//package Transactions 
